#include<iostream>
using namespace std;
class rmb
{
    private:
        int yuan,fen,jiao;
    public:
        rmb(double money)
        {
            yuan=money+0.000001;
            jiao=(money+0.000001-yuan)*10;
            fen=(money+0.000001-yuan-0.1*jiao)*100;
        }
        friend ostream& operator<<(ostream& os,const rmb& a);
};
ostream& operator<<(ostream& os,const rmb& a)
{
    os<<"yuan="<<a.yuan<<" jiao="<<a.jiao<<" fen="<<a.fen;
    return os;
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        double money;
        cin>>money;
        rmb ans(money);
        cout<<ans<<endl;
    }
}